Now AdminManager gets the owner for removing them
[RRRRHHHH_Code] / ruralHouses client / src / gui / DeleteOwnerGUI.java
index 75305dc..19d5513 100644 (file)
@@ -1,13 +1,9 @@
 package gui;
 
-import java.awt.Color;
-import java.awt.Component;
 import java.awt.Font;
 import java.awt.Rectangle;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
 import java.rmi.Naming;
 import java.rmi.RemoteException;
 import java.util.Enumeration;
@@ -22,10 +18,9 @@ import javax.swing.JTable;
 import javax.swing.border.EmptyBorder;
 import javax.swing.table.DefaultTableModel;
 
-
-
 import common.AccountInterface;
-import common.OwnerInterface;
+import common.AdminInterface;
+
 import configuration.___IntNames;
 import domain.Owner;
 
@@ -39,7 +34,7 @@ public class DeleteOwnerGUI extends JFrame {
        private JTable table;
 
        private DefaultTableModel tableModel;
-       private OwnerInterface Own = null;
+       private AdminInterface AdM = null;
        private Vector<Owner> owners = new Vector<Owner>();
 
        /**
@@ -61,14 +56,14 @@ public class DeleteOwnerGUI extends JFrame {
                setContentPane(contentPane);
                contentPane.setLayout(null);
                try {
-                       Own = (OwnerInterface) Naming
-                                       .lookup(___IntNames.OwnerManager);
+                       AdM = (AdminInterface) Naming
+                                       .lookup(___IntNames.AdminManager);
                } catch (Exception e1) {
                        System.out
                                        .println("Error accessing remote authentication: "
                                                        + e1.toString());
                }
-               this.owners = Own.getOwners();
+               this.owners = AdM.getAllOwners();
                JLabel lblNewLabel = new JLabel();
                lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 27));
                lblNewLabel.setBounds(23, 41, 536, 33);